<template>
  <div >
    <n-space class="features">
      <n-card title="半杯哈希🌠" class="custom-font-style" @click="pathRoute('/Article')" hoverable>
      </n-card>

      <!--      <n-card title="getAccessToken" @click="pathRoute('/OAuth2Redirect')" hoverable>-->
      <!--      </n-card>-->

<!--      <n-card title="Token展示" hoverable v-if="accessToken">-->
<!--        <n-table :single-line="false">-->
<!--          <thead>-->
<!--          <tr>-->
<!--            <th style="width: 110px">Key</th>-->
<!--            <th>Value</th>-->
<!--          </tr>-->
<!--          </thead>-->
<!--          <tbody>-->
<!--          <tr v-for="(v, k) in accessToken" :key="k">-->
<!--            <td>{{ k }}</td>-->
<!--            <td>{{ v }}</td>-->
<!--          </tr>-->
<!--          </tbody>-->
<!--        </n-table>-->
<!--      </n-card>-->
    </n-space>
  </div>
</template>

<script setup lang="ts">
import router from '../../router'
// import { createDiscreteApi } from 'naive-ui'

// const { message } = createDiscreteApi(['message'])
// 从缓存中获取token
const accessToken = JSON.parse(String(localStorage.getItem('accessToken')))

/**
 * 根据路径跳转路由
 * @param path 路由路径
 */
const pathRoute = (path: string) => {
  router.push({ path })
}

// const todo = () => {
//   message.info('待开发')
// }
</script>

<style scoped>
.welcome {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.features {
  padding: 8px;
}
.features div {
  cursor: pointer;
}

.custom-font-style {
  font-family: 'Arial';
  font-size: 16px;
  font-weight: bold;
  color: #333;
  /* Add other font styles as needed */
}
</style>
